package com.mew.chess.core.game.dyj.game.message;

import com.zebra.common.ByteBufUtils;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Administrator
 */
@Data
@ToString
public class HistoryMessage{
    private int[] dices;//骰子
    private UserMessage winUser;//赢分最多的玩家

    public void write(ByteBuf b) {
        ByteBufUtils.writeInt(b,dices.length);
        for (Integer dice : dices) {
            ByteBufUtils.writeInt(b,dice);
        }
        winUser.write(b);
    }
}
